package com.syf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.syf.domain.store.BsSmallClass;
import com.syf.mapper.BsSmallClassMapper;
import com.syf.service.BsSmallClassService;

import java.util.List;

/**
*
*
*@author syf
*@create 2022-02-07 19:09
*/
@Service
public class BsSmallClassServiceImpl extends ServiceImpl<BsSmallClassMapper, BsSmallClass> implements BsSmallClassService{

    /**
     * 根据大类获取大类下的子类列表
     *
     * @param parentId
     * @return
     */
    @Override
    public List<BsSmallClass> findByParentId(Integer parentId) {
        LambdaQueryWrapper<BsSmallClass> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(BsSmallClass::getParentId,parentId);
        return list(wrapper);
    }
}
